#include <bits/stdc++.h>

using namespace std;

int main() {

    vector<int> v = {1, 3, 5, 7, 9, 2, 4, 6, 8, 0};

    for (int i = 0; i < v.size(); i++)
        cout << v[i] << " ";
    cout << endl;
    cout << count_if(v.begin(), v.end(), bind2nd(less<int>(), 5)) << endl;// x<5的元素个数
    cout << count_if(v.begin(), v.end(), bind1st(less<int>(), 5)) << endl;// 5<x的元素个数
    return 0;

}

//bind1st函数代表这么一个操作:  x op value;      bind2nd函数代表：value op x。